using System;
using System.Drawing.Printing;

namespace SpoolFileLibrary.Reader.Winspool {
    public class PaperSize {
        private readonly PaperKind paperKind;
        private readonly short paperSizeVlaue;

        public PaperSize(short value) {
            this.paperSizeVlaue = value;
            if(value >= 0x00000100) {
                this.paperKind = PaperKind.Custom;
                return;
            }
            if(!Enum.IsDefined(typeof(PaperKind), (int) value)) {
                return;
            }
            this.paperKind = (PaperKind) value;
            return;
        }

        public PaperKind PaperSizeKind {
            get { return this.paperKind; }
        }

        public short PaperSizeValue {
            get { return this.paperSizeVlaue; }
        }
    }
}